﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class tmp_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadData();
        }
    }

    private void loadData()
    {
        string sql = @"SELECT  [si]
                          ,[Name]
                          ,[status]
                      FROM [OnlineSMS].[dbo].[Table_2]";

        DataSet ds = DatabaseManager.ExecSQL(sql);
        string no = "";
        foreach (DataRow dr in ds.Tables[0].Rows)
        {
            no += (no == "" ? "" : ",") + "'"+dr["Name"].ToString().Split('(')[1].Split(')')[0].Trim()+"'";

        }

        TextBox1.Text = no;
    }
}